﻿using SharpGraphT.Sharp.Sharp.Util;

namespace SharpGraphT.Graph;

public class TestEdge : DefaultEdge {
    private static readonly long SerialVersionUid = 1L;

    public override int GetHashCode() => Objects.Hash(Source, Target);

    public override bool Equals(object obj) {
        if (this == obj) {
            return true;
        }

        if (obj == null) {
            return false;
        }

        if (GetType() != obj.GetType()) {
            return false;
        }

        var other = (TestEdge) obj;
        return Objects.Equals(Source, other.Source) &&
            Objects.Equals(Target, other.Target);
    }
}